package com.iyao_app.util;

import android.graphics.drawable.Drawable;

import com.iyao_app.MyApplication;

/**
 * 作者 :  胡家兵
 * 时间 :  2017/11/10.
 */

public class ResourcesUtils {


    public static MyApplication getApplicationContext() {
        return MyApplication.getInstance();
    }

    public static String getString(int id) {
        return getApplicationContext().getResources().getString(id);
    }

    public static int getColor(int id) {
        return getApplicationContext().getResources().getColor(id);
    }
    public static float getDimension(int id) {
        return getApplicationContext().getResources().getDimension(id);
    }
    public static Drawable getDrawable(int id) {

        return getApplicationContext().getResources().getDrawable(id);
    }
}
